Release 10.1A: OpenEdge Development:
Progress Dynamics Advanced Development
Accessing the manager from viewers
In order for viewers to display a visual cue for required fields, you must override the standard viewer behavior with a
customviewer.pprocedure. As for thedataclass, editsrc/adm2/custom/customviewer.ito start the super procedureadm2/custom/viewercustom.p. Then create a local version ofsrc/adm2/custom/viewercustom.pand define anenableFieldsprocedure in it. Invoke the standard behavior with aRUN SUPERstatement, and then retrieve the Field Edit Manager handle, as shown:
Now you must get the
DataSourcehandle (the viewer’s SDO), which you use to identify thecolumnTableproperty for each of the viewer’s fields. This is the database table the column is derived from, and becomes one of the arguments togetFieldEditData.You also must retrieve the
FieldHandlesproperty of the viewer. This is a list of the widget handles for the field representations in the viewer.For each of the fields, run
getFieldEditDatain the manager to see if there is aRequirededit for the field, as shown:
If there is a
Requirededit, then you modify the side label for the field to begin with an asterisk, as shown:
Save and compile the
viewercustom.pprocedure.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |